public class Teacher extends Person {

    Course course;

    public Teacher(String id, String name, String gender) {
        super(id, name, gender);
    }

    public void openCourse(Course c) {
        this.course = c;
        c.teacher = this;
        System.out.println(name + "老师开设了课程：" + c.name);
    }

    public void printTeach() {
        System.out.println(name + "老师的授课信息：");
        System.out.println("课程：" + course.name + "，地点：" + course.location + "，时间：" + course.time);
    }
}